\hms{} supports importing
\begin{itemize}
	\item meshes created with \textsl{Gmsh}
	\item raster data in the Esri raster format (or similar)
\end{itemize}

If a format you need to import is not supported,
please direct a request at the maintainer.\\

Im- and export capability can also be extended via plugin.

\newpage

\setSlideCaption{\textsl{Gmsh} import}

First, create \textsl{Gmsh} mesh (\texttt{.msh}-file),

then specify directory, file name and format in \texttt{ini}:

\begin{minted}{ini}
[import]
; directory of files to be imported
; can be relative to case directory or absolute
importDir=import

[mesh]
; Options:
; "never" (synonyms: false|off|no)
; "always" (synonyms: true|on|yes)
; "ifNotFound" looks for VTK domain file
; "ifNewer"    compares mesh and VTK file date
import=ifNewer
format=gmsh
file=gmsh_example.msh ; extension may be omitted
optimiseMeshType=true
\end{minted}
\newpage

Import mesh with:
\begin{minted}{bash}
hms --import mesh
\end{minted}
(shorthand \mintinline{bash}|hms -i mesh|)
or
\begin{minted}{bash}
hms --mesh
\end{minted}
(shorthand \mintinline{bash}|hms -m|).\\

Reads \textsl{Gmsh} file, writes mesh to VTK domain file.
%This will read the \textsl{Gmsh} file 
%and write the mesh to the mesh portion of the VTK domain file.

VTK provides specialised types for structured meshes.
With 
\mintinline{ini}|optimiseMeshType=true|,
\hms{} analyses \textsl{Gmsh} mesh and uses optimal VTK type.
%\hms{} will analyse the \textsl{Gmsh} mesh
%and store it in the appropriate VTK mesh type.

\newpage

\setSlideCaption{Raster import}

Example: Esri ASCII raster.

Specify the field, directory, file name and format in the \texttt{ini} file:

\begin{minted}{ini}
[import]
importDir=import
; create a section for any field specified here
fields=BottomElevation
constantFields=
sourceFields_Mass=

[BottomElevation]
; synonym: importBottomElevation
import=true
format=esri
file=dem_example.asc
\end{minted}

\newpage

Import all fields and mesh:
\begin{minted}{bash}
hms --import
\end{minted}
(same as \mintinline{bash}|hms --import all|) \\

Import specific field type

(%
\mintinline{bash}|field|,
\mintinline{bash}|sourceField|, or
\mintinline{bash}|constantField)|%
):
\begin{minted}{bash}
hms --import field
\end{minted}

Import specific field:
\begin{minted}{bash}
hms --import field BottomElevation
\end{minted}

\hms{} translates raster to cell values, using cell centroid coordinates.

This takes raster and mesh origin coordinates into account.

\newpage



%By running
%
%\begin{minted}{bash}
%hms --import
%\end{minted}
%
%without arguments
%(or with the argument \mintinline{bash}|all|)%
%, the mesh and all fields specified in the \texttt{ini} are imported.
%
%You may also only import fields of a single type
%(%
%\mintinline{bash}|field|,
%\mintinline{bash}|sourceField|, or
%\mintinline{bash}|constantField)|%
%):
%
%\begin{minted}{bash}
%hms --import field
%\end{minted}
%
%or a single field of a specific type:
%
%\begin{minted}{bash}
%hms --import field BottomElevation
%\end{minted}
%
%This will translate the raster file(s) to cell values,
%according to each cell's centroid coordinates.
%This also takes the raster and mesh origin coordinates into account.

\newpage